Radar Host Communication library  2020.08.13
EndpointRadarD2GL.h
Go to the documentation of this file.
1 
9 /* ===========================================================================
10 ** Copyright (C) 2017-2021 Infineon Technologies AG
11 ** All rights reserved.
12 ** ===========================================================================
13 **
14 ** ===========================================================================
15 ** This document contains proprietary information of Infineon Technologies AG.
16 ** Passing on and copying of this document, and communication of its contents
17 ** is not permitted without Infineon's prior written authorisation.
18 ** ===========================================================================
19 */
20 
21 #ifndef ENDPOINTRADARD2GL_H_INCLUDED
22 #define ENDPOINTRADARD2GL_H_INCLUDED
23 
24 /*
25 ==============================================================================
26  1. INCLUDE FILES
27 ==============================================================================
28 */
29 #include <stdint.h>
30 #include <stdbool.h>
32 #include "radar_common.h"
33 /* Enable C linkage if header is included in C++ files */
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif /* __cplusplus */
38 
39 
40 
41 typedef struct {
42  uint32_t rf_frequency_khz;
43  uint32_t bandwidth_mhz;
44  uint8_t major_version;
45  uint8_t minor_version;
46  uint8_t num_tx_antenna;
47  uint8_t num_rx_antenna;
48 
50  char *description;
51  char *modulation;
54 
55 typedef struct {
56  void *pData;
58 
67 typedef struct {
72  uint32_t hold_threshold;
80 
81 
82 typedef struct {
83 
87 
91 
95 
96  uint8_t size_elems;
97  uint16_t *p_sample_list;
98 
102 
106 
110 
114 
116 
117 
118 typedef struct {
119  void *pData; // currently the is nothing special to the data
121 
122 
123 typedef struct {
124  uint32_t result_count;
125  uint32_t frame_number;
126 
127  float range_m;
128  float strength;
130  uint8_t target_status; /* not detected: 0, static: 1, Transit: 2, moving: 3 */
131  uint8_t direction_of_movement; /* ... */
132 
134 
135 
136 typedef struct {
137  uint32_t result_count;
138  uint32_t frame_number;
139 
140  float range_m;
141  float strength;
143  uint8_t target_status; /* not detected: 0, static: 1, Transit: 2, moving: 3 */
144  uint8_t direction_of_movement; /* ... */
145 
147  uint16_t num_hold_data;
148 
150  float *p_hold_data;
152 
153 
154 /*
155 ==============================================================================
156  5. FUNCTION PROTOTYPES AND INLINE FUNCTIONS
157 ==============================================================================
158 */
159 
177 int32_t ep_radar_d2gl_scfmcw_is_compatible_endpoint(int32_t protocol_handle,
178  uint8_t endpoint);
179 
180 
199 typedef void(*fmcw_para_values_cnf_callback_t)(void *p_context, int32_t protocol_handle,
200  uint8_t endpoint, fmcw_para_values_t *ps_para_values);
201 
202 
221 typedef void(*fmcw_para_values_def_cnf_callback_t)(fmcw_para_values_def_cnf_ctx_t *p_context, int32_t protocol_handle,
222  uint8_t endpoint, fmcw_para_value_def_host_t *ps_para_values);
223 
224 
225 typedef void(*fmcw_result_cnf_callback_t)(void *p_context, int32_t protocol_handle,
226  uint8_t endpoint, fmcw_result_cnf_t *ps_para_values);
227 
228 typedef void(*fmcw_adv_result_cnf_callback_t)(void *p_context, int32_t protocol_handle,
229  uint8_t endpoint, fmcw_adv_result_cnf_t *ps_para_values);
230 
231 typedef void(*fmcw_get_shield_info_cnf_callback_t)(fmcw_get_shield_info_cnf_ctx_t *p_context, int32_t protocol_handle,
232  uint8_t endpoint, fmcw_get_shield_info_cnf_t *ps_temperature);
233 
234 
249 int32_t ep_radar_d2gl_scfmcw_para_value_req(int32_t protocol_handle, uint8_t endpoint);
250 
251 int32_t ep_radar_d2gl_scfmcw_para_value_def_req(int32_t protocol_handle, uint8_t endpoint);
252 
253 int32_t ep_radar_d2gl_scfmcw_para_set_value_req(int32_t protocol_handle, uint8_t endpoint, fmcw_para_values_t *p_data);
254 
255 int32_t ep_radar_d2gl_scfmcw_result_req(int32_t protocol_handle, uint8_t endpoint, uint32_t repeat_count);
256 
257 int32_t ep_radar_d2gl_scfmcw_adv_result_req(int32_t protocol_handle, uint8_t endpoint, uint32_t repeat_count);
258 
259 int32_t ep_radar_d2gl_scfmcw_get_shield_info_req(int32_t protocol_handle, uint8_t endpoint);
260 
261 int32_t ep_radar_d2gl_scfmcw_get_raw_data_req(int32_t protocol_handle, uint8_t endpoint, uint32_t repeat_count);
262 
263 
265  void* p_context, void **prev_context);
266 
268  fmcw_para_values_def_cnf_ctx_t* p_context);
269 
271  void* p_context);
272 
274  void* p_context);
275 
277  fmcw_get_shield_info_cnf_ctx_t* p_context);
278 
280  void* p_context);
281 
282 
285 /* --- Close open blocks -------------------------------------------------- */
286 
287 /* Disable C linkage for C++ files */
288 #ifdef __cplusplus
289 } /* extern "C" */
290 #endif /* __cplusplus */
291 
292 /* End of include guard */
293 #endif /* ENDPOINTRADARD2GL_H_INCLUDED */
294 
295 /* --- End of File -------------------------------------------------------- */
void ep_radar_d2gl_scfmcw_set_adv_result_cb(fmcw_adv_result_cnf_callback_t callback, void *p_context)
uint8_t baseband_gain_stage_bool
void ep_radar_d2gl_scfmcw_set_result_cb(fmcw_result_cnf_callback_t callback, void *p_context)
void ep_radar_d2gl_scfmcw_set_shield_info_cb(fmcw_get_shield_info_cnf_callback_t callback, fmcw_get_shield_info_cnf_ctx_t *p_context)
int32_t ep_radar_d2gl_scfmcw_para_value_def_req(int32_t protocol_handle, uint8_t endpoint)
This file defines the status codes of the radar endpoints.
int32_t ep_radar_d2gl_scfmcw_is_compatible_endpoint(int32_t protocol_handle, uint8_t endpoint)
This function checks if an endpoint in a device is a Radar D2GL endpoint.
void(* fmcw_get_shield_info_cnf_callback_t)(fmcw_get_shield_info_cnf_ctx_t *p_context, int32_t protocol_handle, uint8_t endpoint, fmcw_get_shield_info_cnf_t *ps_temperature)
void ep_radar_d2gl_scfmcw_set_para_def_cb(fmcw_para_values_def_cnf_callback_t callback, fmcw_para_values_def_cnf_ctx_t *p_context)
void(* fmcw_para_values_def_cnf_callback_t)(fmcw_para_values_def_cnf_ctx_t *p_context, int32_t protocol_handle, uint8_t endpoint, fmcw_para_value_def_host_t *ps_para_values)
This is the callback type executed on a parameter value confirmation event, triggered,...
void(* fmcw_adv_result_cnf_callback_t)(void *p_context, int32_t protocol_handle, uint8_t endpoint, fmcw_adv_result_cnf_t *ps_para_values)
int32_t ep_radar_d2gl_scfmcw_get_shield_info_req(int32_t protocol_handle, uint8_t endpoint)
int32_t ep_radar_d2gl_scfmcw_para_set_value_req(int32_t protocol_handle, uint8_t endpoint, fmcw_para_values_t *p_data)
void ep_radar_d2gl_scfmcw_set_raw_data_cb(get_raw_data_cnf_callback_t callback, void *p_context)
int32_t ep_radar_d2gl_scfmcw_adv_result_req(int32_t protocol_handle, uint8_t endpoint, uint32_t repeat_count)
void(* get_raw_data_cnf_callback_t)(get_raw_data_cnf_ctx_t *p_context, int32_t protocol_handle, uint8_t endpoint, get_raw_data_cnf_t *ps_raw_data)
Definition: radar_common.h:214
This file contains the API methods applicable generically to Industrial radar demo Sence2Go-Pulse and...
void(* fmcw_para_values_cnf_callback_t)(void *p_context, int32_t protocol_handle, uint8_t endpoint, fmcw_para_values_t *ps_para_values)
This is the callback type executed on a parameter value confirmation event, triggered,...
int32_t ep_radar_d2gl_scfmcw_para_value_req(int32_t protocol_handle, uint8_t endpoint)
This function is used to request the parameter values,.
int32_t ep_radar_d2gl_scfmcw_result_req(int32_t protocol_handle, uint8_t endpoint, uint32_t repeat_count)
fmcw_para_values_cnf_callback_t ep_radar_d2gl_scfmcw_set_para_value_cb(fmcw_para_values_cnf_callback_t callback, void *p_context, void **prev_context)
uint8_t number_of_chirps_per_frame
int32_t ep_radar_d2gl_scfmcw_get_raw_data_req(int32_t protocol_handle, uint8_t endpoint, uint32_t repeat_count)
void(* fmcw_result_cnf_callback_t)(void *p_context, int32_t protocol_handle, uint8_t endpoint, fmcw_result_cnf_t *ps_para_values)